﻿using System;
using System.Collections.Generic;

namespace GiveAQuiz.Web.Helpers
{
  public static class EnumerableExtensions
  {
    public static void Each<T>(this IEnumerable<T> enumeration, Action<T> action)
    {
      if ( enumeration != null )
      {
        foreach (var item in enumeration )
        {
          action(item);
        }
      }
    }
  }
}